<template>
  <div class="recommends">
    <div
      class="recommend-item"
      v-for="(item, index) in recommends"
      :key="index"
    >
      <a href="item.link">
        <img class="recommend-img" :src="item.image" alt="" />
        <div>{{ item.title }}</div>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    recommends: {
      type: Array,
      default() {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.recommends {
  width: 100%;
  display: flex;
  text-align: center;
  padding: 10px 5px;
  border-bottom: 5px solid #eee;
}
.recommend-item {
  display: 1;
  width: 25%;
  margin: 0px 7px;
}
.recommend-img {
  width: 100%;
}
</style>
